package com.example.tetris.gui;

import com.example.tetris.App;
import com.example.tetris.logics.controller.GameManager;
import com.example.tetris.restore.GameSave;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;

import java.io.IOException;

public class HomePageController {
    @FXML
    protected void onNewGameClick() throws IOException {

        App.setRoot("gamePage");
    }

    @FXML
    public  void  initialize(){
    }

    @FXML
    public void onContinueGame(){
        GameSave.loadGame();
    }
    public void closeSystem(){
        Platform.exit();
        System.exit(0);
    }
    public void minimizeWindow(){
        App.getStage().setIconified(true);
    }
}